package com.wing.productionPlan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.productionPlan.model.entity.QualityTestingRecordDetail;
import com.wing.productionPlan.model.request.QualityTestingRecordDetailForm;
import com.wing.productionPlan.model.response.QualityTestingRecordDetailVO;
import com.wing.qualityTesting.model.response.QualityDetailRecordInfoVo;

import java.util.List;
import java.util.Map;

/**
 * 质检记录详情表-Service
 *
 * @author
 */
public interface QualityTestingRecordDetailService extends IService<QualityTestingRecordDetail> {

    /**
     * 添加
     *
     * @param qualityTestingRecordDetailForm
     * @return
     */
    int add(QualityTestingRecordDetailForm qualityTestingRecordDetailForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<QualityTestingRecordDetailVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<QualityTestingRecordDetailVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    QualityTestingRecordDetailVO get4appById(Long id);

    /**
     * 查询工序已排产数量和平均合格率
     * @return
     */
    Map<String,Object> getProcessOutputAndYield(Long processId,Long productionPlanId);

    List<QualityTestingRecordDetailVO> getQualityTestingRecordDetail(Long qualityTestingRecordId);

    /**
     * 查询任务记录信息
     * @param taskId
     * @return
     */
    QualityDetailRecordInfoVo getDetailRecordValue(Long taskId,Long recordDetailId);
}
